home *** CD-ROM | disk | FTP | other *** search
- package java.nio;
-
- class HeapFloatBuffer extends FloatBuffer {
- HeapFloatBuffer(int var1, int var2) {
- super(-1, 0, var2, var1, new float[var1], 0);
- }
-
- HeapFloatBuffer(float[] var1, int var2, int var3) {
- super(-1, var2, var2 + var3, var1.length, var1, 0);
- }
-
- protected HeapFloatBuffer(float[] var1, int var2, int var3, int var4, int var5, int var6) {
- super(var2, var3, var4, var5, var1, var6);
- }
-
- public FloatBuffer slice() {
- return new HeapFloatBuffer(this.hb, -1, 0, this.remaining(), this.remaining(), this.position() + this.offset);
- }
-
- public FloatBuffer duplicate() {
- return new HeapFloatBuffer(this.hb, this.markValue(), this.position(), this.limit(), this.capacity(), this.offset);
- }
-
- public FloatBuffer asReadOnlyBuffer() {
- return new HeapFloatBufferR(this.hb, this.markValue(), this.position(), this.limit(), this.capacity(), this.offset);
- }
-
- // $FF: renamed from: ix (int) int
- protected int method_0(int var1) {
- return var1 + this.offset;
- }
-
- public float get() {
- return this.hb[this.method_0(this.nextGetIndex())];
- }
-
- public float get(int var1) {
- return this.hb[this.method_0(this.checkIndex(var1))];
- }
-
- public FloatBuffer get(float[] var1, int var2, int var3) {
- checkBounds(var2, var3, var1.length);
- if (var3 > this.remaining()) {
- throw new BufferUnderflowException();
- } else {
- System.arraycopy(this.hb, this.method_0(this.position()), var1, var2, var3);
- this.position(this.position() + var3);
- return this;
- }
- }
-
- public boolean isDirect() {
- return false;
- }
-
- public boolean isReadOnly() {
- return false;
- }
-
- public FloatBuffer put(float var1) {
- this.hb[this.method_0(this.nextPutIndex())] = var1;
- return this;
- }
-
- public FloatBuffer put(int var1, float var2) {
- this.hb[this.method_0(this.checkIndex(var1))] = var2;
- return this;
- }
-
- public FloatBuffer put(float[] var1, int var2, int var3) {
- checkBounds(var2, var3, var1.length);
- if (var3 > this.remaining()) {
- throw new BufferOverflowException();
- } else {
- System.arraycopy(var1, var2, this.hb, this.method_0(this.position()), var3);
- this.position(this.position() + var3);
- return this;
- }
- }
-
- public FloatBuffer put(FloatBuffer var1) {
- if (var1 instanceof HeapFloatBuffer) {
- if (var1 == this) {
- throw new IllegalArgumentException();
- }
-
- HeapFloatBuffer var2 = (HeapFloatBuffer)var1;
- int var3 = var2.remaining();
- if (var3 > this.remaining()) {
- throw new BufferOverflowException();
- }
-
- System.arraycopy(var2.hb, var2.method_0(var2.position()), this.hb, this.method_0(this.position()), var3);
- var2.position(var2.position() + var3);
- this.position(this.position() + var3);
- } else if (var1.isDirect()) {
- int var4 = var1.remaining();
- if (var4 > this.remaining()) {
- throw new BufferOverflowException();
- }
-
- var1.get(this.hb, this.method_0(this.position()), var4);
- this.position(this.position() + var4);
- } else {
- super.put(var1);
- }
-
- return this;
- }
-
- public FloatBuffer compact() {
- System.arraycopy(this.hb, this.method_0(this.position()), this.hb, this.method_0(0), this.remaining());
- this.position(this.remaining());
- this.limit(this.capacity());
- return this;
- }
-
- public ByteOrder order() {
- return ByteOrder.nativeOrder();
- }
- }
-